package com.meatball.game.factory

import com.meatball.game.service.AiGameService
import com.meatball.game.service.RoomCacheService
import com.meatball.game.websocket.RoomManager
import org.springframework.data.redis.core.StringRedisTemplate
import org.springframework.stereotype.Component

/**
 * TODO 定制房间管理工厂类
 *
 * @property stringRedisTemplate
 */
@Component
class RoomManagerFactory (
        private val aiGameService: AiGameService,
        private val stringRedisTemplate: StringRedisTemplate,
        private val roomCacheService: RoomCacheService
) {
    fun createRoomManager(): RoomManager {
        return RoomManager(aiGameService, stringRedisTemplate, roomCacheService)
    }
}